//
//  AdMoreNativeAdManager.h
//  AdMoreSDKDemo
//
//  Created by Hayder on 2023/11/16.
//

#import <UIKit/UIKit.h>
#import "AdMoreNativeAd.h"

NS_ASSUME_NONNULL_BEGIN
@protocol AdMoreNativeAdManagerDelegate <NSObject>

@optional
/**信息流广告加载成功*/
- (void)nativeAdViewsLoadSuccess:(NSArray <AdMoreNativeAd *>*)nativeAds;
/**信息流广告加载失败**/
- (void)nativeAdViewsFailedToLoadWithError:(NSError *)error;

@end

@interface AdMoreNativeAdManager : NSObject

@property (nonatomic, strong,readonly) NSString *slotID;
@property (nonatomic, strong,readonly) UIViewController *rootViewController;
@property (nonatomic, assign,readonly) CGSize adSize;

@property (nonatomic, weak) id<AdMoreNativeAdManagerDelegate> delegate;

/**
 推荐
 slotID: 广告位ID
 rootViewController: 广告链接跳转的根控制器
 默认屏幕宽度，由于各个公司广告宽高比不同，在nativeAdViewRenderSuccess中可以获得广告的真实高度
 */
- (instancetype)initWithSlotID:(NSString *)slotID rootController:(UIViewController *)rootViewController;

/**
 slotID: 广告位ID
 rootViewController: 广告链接跳转的根控制器
 adSize: 广告大小 由于各个公司广告宽高比不同，在nativeAdViewRenderSuccess中可以获得广告的真实高度。
 */
- (instancetype)initWithSlotID:(NSString *)slotID rootController:(UIViewController *)rootViewController adSize:(CGSize)adSize;

/**加载广告*/
- (void)loadAdDataWithCount:(NSInteger)count;

@end

NS_ASSUME_NONNULL_END
